package com.ihr360.cnb.module.payroll.service.fllback;

import com.ihr360.authority.sharing.model.vo.SimpleAuthUserResourceVo;
import com.ihr360.cnb.module.payroll.service.PayrollService;
import com.ihr360.commons.exception.Ihr360Exception;
import com.ihr360.commons.vo.PageData;
import com.ihr360.commons.vo.ResultInfo;
import com.ihr360.entity.ApplicationApprovalEntity;
import com.ihr360.entity.StaffBankSalaryEntity;
import com.ihr360.payroll.config.system.SystemSalaryFieldEntity;
import com.ihr360.payroll.entity.setting.SalaryCompanySettingEntity;
import com.ihr360.payroll.entity.staff.CompanySalaryProfileEntity;
import com.ihr360.payroll.entity.staff.StaffPayrollInfoJournalEntity;
import com.ihr360.payroll.entity.staff.StaffSalaryEntity;
import com.ihr360.payroll.entity.staff.StaffSalaryProfileEntity;
import com.ihr360.payroll.request.StaffPayrollInfoJournalRequest;
import com.ihr360.payroll.request.StaffPayrollInfoRequest;
import com.ihr360.payroll.request.StaffPayrollInfosRequest;
import com.ihr360.payroll.request.StaffSalaryProfileSearchBody;
import com.ihr360.payroll.request.attendance.AttendanceOverTimeRequest;
import com.ihr360.payroll.request.attendance.AttendanceTakeNumberRequest;
import com.ihr360.payroll.response.StaffPayrollInfoResponse;
import com.ihr360.payroll.response.attendance.AttendanceSummaryResponse;
import com.ihr360.payroll.type.AttendanceState;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author richey
 */
@Component
public class PayrollServiceFallback implements PayrollService {
    @Override
    public ResultInfo abnormalityAdjustProfile(StaffPayrollInfoRequest staffPayrollInfoRequest) {
        throw new Ihr360Exception("", "薪资服务异常！");
    }

    @Override
    public ResultInfo adjustSalaryProfileWrapper(StaffPayrollInfosRequest infos) {
        throw new Ihr360Exception("","薪资服务异常,修改员工薪资失败！");
    }

    @Override
    public List<String> probationReviewStaffIdsFromIrs(String companyId) {
        return null;
    }

    @Override
    public List<String> getAllCompanyIds() {
        return null;
    }

    @Override
    public SystemSalaryFieldEntity getBasicSalaryField(String fieldCode) {
        return null;
    }

    @Override
    public List<String> findStaffIdsForExistSalaryProfile(String companyId) {
        return null;
    }

    @Override
    public CompanySalaryProfileEntity findCompanySalaryProfileId(String companyId) {
        return null;
    }

    @Override
    public List<StaffSalaryProfileEntity> getStaffSalaryProfiles(String staffId,String companyId) {
        return null;
    }

    @Override
    public boolean saveStaffSalaryProfiles(List<StaffSalaryProfileEntity> toSave) {
        return false;
    }

    @Override
    public boolean saveStaffSalaryProfileJournals(List<StaffPayrollInfoJournalEntity> journalToSave) {
        return false;
    }

    @Override
    public ResultInfo batchInitCompanySalaryProfile() {
        throw new Ihr360Exception("", "薪资服务异常！");
    }

    @Override
    public ResultInfo initCompanySalaryProfile(String companyId) {
        return null;
    }

    @Override
    public AttendanceSummaryResponse attendanceTakeNumber(AttendanceTakeNumberRequest request) {
        throw new Ihr360Exception("", "同步考勤数据异常！");
    }

    @Override
    public void takeNumberMonthlyReport(AttendanceTakeNumberRequest takeNumberRequest) {
        throw new Ihr360Exception(null, "同步考勤数据异常！");
    }

    @Override
    public void saveStaffSalaryInfo(StaffSalaryEntity staffSalaryEntity) {
        throw new Ihr360Exception(null, "员工薪资信息保存异常！");
    }

    @Override
    public void saveApprovalApplicationId(String companyId, ApplicationApprovalEntity response, Long id) {
        throw new Ihr360Exception(null, "提请审批保存异常！");
    }

    @Override
    public List<SimpleAuthUserResourceVo> getResourceUsers(String companyId, String bizModelAlias, String resourceId) {
        throw new Ihr360Exception(null, "获取资源的权限数据异常！");
    }

    @Override
    public AttendanceOverTimeRequest lockAttendanceState(Long summaryId, AttendanceState state) {
        throw new Ihr360Exception(null, "考勤汇总锁定失败！");
    }

    @Override
    public AttendanceOverTimeRequest rollBackAttendanceSummaryData(Long summaryId) {
        throw new Ihr360Exception(null, "考勤汇总回滚删除失败！");
    }

    @Override
    public AttendanceOverTimeRequest rollBackState(Long summaryId, AttendanceState state) {
        throw new Ihr360Exception(null, "考勤汇总回滚锁定状态失败！");
    }

    @Override
    public void saveAllStaffSalaryInfo(String companyId, List<StaffBankSalaryEntity> staffBankSalaryEntityList) {
        throw new Ihr360Exception(null, "同步公司员工银行卡信息失败！");
    }

    @Override
    public SalaryCompanySettingEntity querySalaryCompanySetting(String companyId) {
        throw new Ihr360Exception(null, "查询公司薪资审批设置异常！");
    }

    @Override
    public void closeActivePeriod(String companyId,Long id) {
        throw new Ihr360Exception(null, "薪酬账期关账失败！");
    }

    @Override
    public StaffPayrollInfoResponse getCurrentEffective(StaffSalaryProfileSearchBody param) {
        throw new Ihr360Exception(null, "查询当前生效员工薪资数据！");
    }

    @Override
    public PageData<StaffPayrollInfoJournalEntity> findAllAuthJournals(StaffPayrollInfoJournalRequest param) {
        throw new Ihr360Exception(null, "查询薪资调整记录异常！");
    }
}
